# 1. for
total = 0
for i in range(1, 101):
    total += i
print(total)


# 2. while
x = 1
total = 0
while x <= 100:
    total += x  # 累加
    x += 1  # 递增计数
print(total)
